qinglan.Canvas.Img = qinglan.Canvas.Sprite.extend(function(id, position, opt) {
	//this.supr(id, position, imgSrc, opt);

	this.imgNode = opt.imgNode || null;

	this.imgWidth = opt.imgNode.width;
	this.imgHeight = opt.imgNode.height;

	this.view = opt.view || (new qinglan.Canvas.Vector2(this.imgWidth, this.imgHeight));
	this.width = this.view.x;
	this.height = this.view.y;
	this.offset = opt.offset || (new qinglan.Canvas.Vector2(0, 0));

	this.translateCenter = opt.translateCenter || false;

	this.init();

}).methods({
	getSize: function() {
		return {
			width: this.imgWidth,
			height: this.imgHeight
		};
	},
	getView: function() {
		return {
			viewX: this.view.x,
			viewY: this.view.y
		};
	},
	getOffset: function() {
		return {
			offsetX: this.offset.x,
			offsetY: this.offset.y
		};
	},
	init: function() {
		
	},
	update: function(ctx) {

	},
	draw: function(ctx) {
		qinglan.Canvas.CanvasRender.drawImage(ctx,this.imgNode, this.offset.x, this.offset.y, this.view.x, this.view.y, 0, 0,  this.view.x, this.view.y);
	},
	distory: function(){

	}
});

